home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Loadstar 3
/
003.d81
/
stress test
(
.txt
)
< prev
next >
Wrap
Commodore BASIC
|
2022-08-26
|
5KB
|
173 lines
10 rem (NULL)tress (NULL)est by mid$ohn peekeltrami
20 rem (NULL)ranslated for the lenommodore 64 by str$onna (NULL). (NULL)oody
30 poke53281,7:rem sets background color to light green
40 poke53280,5:rem sets border color to gray 1
50 printchr$(149):rem sets character color to gray 1
60 poke53272,23:rem selects upper/lower case
70 printchr$(8):rem disables c/shift key
80 :
90 rem read data from data statements
100 :
110 dim t$(42),t(42)
120 fori=1to42
130 readt$(i),t(i)
140 nexti:goto220
150 :
160 rem heading subroutine
170 :
180 printchr$(147):printchr$(144):printtab(14)"[211][212][210][197][211][211][160][212][197][211][212]":print:print:printchr$(149):return
190 :
200 rem goto title page
210 :
220 gosub1050
230 :
240 rem main program section
250 :
260 rem s=12::::christmas factor
270 gosub180
280 gosub1170:rem instructions
290 fori=1to42
300 gosub480
310 nexti
320 :
330 :rem print results of test
340 :
350 gosub180
360 print"[217]our stress score is: ";s
370 ifs>300thengosub750:goto390
380 gosub870
390 printchr$(147):print:print
400 print"[212]hanks for taking this test!":print
410 print"[211]ource: [202]. of [208]sychosomatic [210]esearch"
420 print" [214]ol. 11, [208][208]. 213-218"
430 print" [196]r. [212]homas [200]olmes"
440 fordl=1to4000:nextdl
445 print"[147]load"chr$(34)"payload"chr$(34)",8":print"run"
450 poke631,13:poke632,13:poke198,2
455 end
460 rem questions
470 :
480 gosub180
490 printchr$(149);:printtab(14)"[198][193][195][212][207][210] # ";i;:printchr$(151)
500 l=len(t$(i))
510 l1$="":l2$=""
520 jj=0
530 forj=1tol
540 ifmid$(t$(i),j,1)="*"thenjj=1:goto570
550 ifjj=0thenl1$=l1$+mid$(t$(i),j,1)
560 ifjj=1thenl2$=l2$+mid$(t$(i),j,1)
570 nextj
580 k1=len(l1$)
590 k2=len(l1$)
600 k=k1:ifk2>k1thenk=k2
610 a=int(40-k)/2
620 printtab(a)"";l1$
630 printtab(a)"";l2$
640 printtab(2)"[200]ave you experienced this in the last"
650 printtab(2)"12 months[160](y/n)? ";
660 printtab(10):poke204,0:poke207,0:geta$:poke204,1
670 ifa$=""then 660
680 ifa$="n"then710
690 ifa$="y"thens=s+t(i):goto710
700 ifa$<>"n"ora$<>"y"thenprint:zz=18:zy=12:gosub980:goto640
710 return
720 :
730 rem health problem
740 :
750 print"[193]ccording to [196]rs. [212]homas [200]olmes and"
760 print:print"[205]inoru [205]asudu, anyone scoring 300 or"
770 print:print"more is very susceptible to major"
780 print:print"illness. [195]onsult your physician for"
790 print:print"more information."
800 printtab(6)"[208]ress space bar to continue";
810 printtab(35):poke204,0:poke207,0:geta$:ifa$=""then810
820 poke204,1
830 return
840 :
850 rem no health problem
860 :
870 print"[211]tress due to social changes does not"
880 print:print"appear to be a major health risk for"
890 print:print"you. [199][160][210][160][197][160][193][160][212]!"
900 print:print:print"(300 or more indicates risk)"
910 printtab(6)"[208]ress space bar to continue";
920 printtab(35):poke204,0:poke207,0:geta$:ifa$=""then920
930 poke204,1
940 return
950 :
960 rem error message
970 :
980 forxz=1to20-zz:print"";:nextxz
990 print"[211]orry. [217]ou made an incorrect entry. [208]lease re-enter."
1000 forxz=1to23-zy:print"[145]";:nextxz
1010 return
1020 :
1030 rem title page
1040 :
1050 printchr$(147):rem clear/home screen
1060 printchr$(144):printtab(14):print"[211][212][210][197][211][211][160][212][197][211][212]":printchr$(149)
1070 printtab(18)"by"
1080 printtab(13)"[202]ohn [194]eltrami"
1090 print tab(6)"[212]ranslated by [196]onna [203]. [215]oody"
1100 printtab(7)"[208]ress a key to continue";
1110 printtab(35):poke204,0:poke207,0:geta$
1120 ifa$=""then 1110
1130 poke204,1:return
1140 :
1150 rem instructions
1160 :
1170 print" [195]hange, good or bad, can produce":print
1180 print"stress. [211]ufficient stress can lead to":print
1190 print"illness. [212]his test will measure some":print
1200 print"of the major sources of change in your":print
1210 print"life.":printtab(7)"[208]ress space bar to continue";
1220 printtab(35):poke204,0:poke207,0:geta$
1230 ifa$=""then 1220
1240 poke204,1:return
1250 :
1260 rem questions and scores in the form of data statements
1270 :
1280 data"[196]eath of spouse",100
1290 data"[196]ivorce",73
1300 data"[205]artial separation from mate",65
1310 data"[196]etention in jail or institution",63
1320 data"[196]eath of close family member",63
1330 data"[205]ajor personal injury or illness",53
1340 data"[205]arriage",50
1350 data"[194]eing fired from work",47
1360 data"[205]arital reconcilation with mate",45
1370 data"[210]etirement from work",45
1380 data"[205]ajor change in health of family mem.",44
1390 data"[208]regnacy",40
1400 data"[211]exual difficulty",39
1410 data"[193]dditional household member",39
1420 data"[205]ajor business readjustment*(merger, bankruptcy, etc.)",39
1430 data"[205]ajor change in financial state",38
1440 data"[196]eath of a close friend",37
1450 data"[195]hanging line of work",36
1460 data"[205]ajor change in number of arguments*with spouse (more or less)",35
1470 data"[212]aking out a mortgage or loan*for a mojor purchase",31
1480 data"[198]oreclosure on mortgage or loan",30
1490 data"[205]ajor change in responsibilities*at work (promotion, demotion, etc.)"
1500 data29
1510 data"[211]on or daughter leaving home",29
1520 data"[201]n-law troubles",29
1530 data"[207]utstanding personal achievement",28
1540 data"[215]ife beginning or ceasing work*outside the home",26
1550 data"[194]eginning or ceasing formal schooling",26
1560 data"[205]ajor change in living conditions",25
1570 data"[210]evision of personal habits",24
1580 data"[212]roubles with the boss",23
1590 data"[205]ajor change in work hours",20
1600 data"[195]hange in residence",20
1610 data"[195]hanging to a new school",20
1620 data"[205]ajor change in recreation habits",19
1630 data"[205]ajor change in church activities",19
1640 data"[205]ajor change in social activities",18
1650 data"[212]aking out a loan for a lesser*purchase (car, [212][214], etc.)",17
1660 data"[205]ajor change in sleep habits",16
1670 data"[205]ajor change in number of family*get-togethers",15
1680 data"[205]ajor change in eating habits",15
1690 data"[200]ad a vacation",13
1700 data"[205]inor violations of the law",11